
Public Class Form1
    Dim obj As ObjUtils = New ObjUtils
    Private ConnectionString As String = _
      "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;" & _
      "Dbq=" & Application.StartupPath & "\test.xls;"

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim Con As New Odbc.OdbcConnection(ConnectionString)
        Dim CmdSelect As New Odbc.OdbcCommand("SELECT * FROM [Sheet1$]", Con)
        Dim Adapter As New Odbc.OdbcDataAdapter(CmdSelect)
        Dim Ds As New DataSet
        Try
            Con.Open()
            Adapter.Fill(Ds, "Sheet1")
        Catch Err As Exception
            MessageBox.Show(Err.ToString())
        Finally
            Con.Close()
        End Try
        grid.DataSource = Ds.Tables("Sheet1")
        Me.UltraGrid1.DataSource = Ds.Tables("Sheet1")
        obj.addObject(New ObjUtils(Me.UltraGrid1, ObjUtils._None))
        obj.setGiaoDien()
    End Sub

End Class